<template>
	<view class="my-title-box" :style="styleCustom" :class="padding_==1?'padding_':''">
		<view class="my-title-item" :style="{borderBottom:!border?'none':'1px solid #E7E7E7'}">
			<view class="my-sign"></view>
			<view class="my-title">{{ $t(title) }}</view>
			<view class="my-title" style="margin-left: auto;font-size: 14px">
				<text @click="doClick">{{ $t(msg) }}</text>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		props: {
			title: {
				type: String,
				default: '',
				required: false,
			},
			msg: {
				type: String,
				default: '',
				required: false,
			},
			border: {
				type: Boolean,
				default: true,
			},
			cusStyle: {
				type: String,
				default: '',
			},
			padding_:{
				type: Number,
				default: 0,
			}
		},
		data() {
			return {};
		},
		mounted() {},
		computed: {
			styleCustom() {
				return `${this.cusStyle}`
			}
		},
		methods: {
			doClick() {
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.my-title-box {
		background-color: #FFFFFF;
		padding: 20rpx 40rpx 10rpx 40rpx;
		margin-top: 20rpx;

		.my-title-item {
			display: flex;
			padding-bottom: 10rpx;
			justify-content: space-between;
			margin-bottom: 10px;

			.my-sign {
				width: 4rpx;
				margin-right: 10.47rpx;
				height: 36rpx;
				border: 5rpx solid;
				border-color: #ff9a22;
				transform: translateY(2rpx);
				// border-image: linear-gradient(180deg, rgba(221, 42, 16, 1), rgba(247, 152, 41, 1)) 5 5;
			}

			.my-title {
				font-weight: 500;
				font-size: 16px;
			}

			.my-text {
				text-align: right;
				width: 70%;
				font-size: 14px;
				color: #888888;
			}

			.my-label {
				font-size: 14px;
			}
		}
	}
	
	.padding_{
		padding: 20rpx 20rpx 10rpx 20rpx !important;
	}
</style>